﻿' ----------------------------------------------------------------------------------
' Microsoft Developer & Platform Evangelism
' 
' Copyright (c) Microsoft Corporation. All rights reserved.
' 
' THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
' EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 
' OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ----------------------------------------------------------------------------------
' The example companies, organizations, products, domain names,
' e-mail addresses, logos, people, places, and events depicted
' herein are fictitious.  No association with any real company,
' organization, product, domain name, email address, logo, person,
' places, or events is intended or should be inferred.
' ----------------------------------------------------------------------------------

Imports Microsoft.Samples.WindowsPhoneCloud.StorageClient.Credentials
Imports Microsoft.Samples.WindowsPhoneCloud.StorageClient
Imports Microsoft.Samples.WindowsPhoneCloud.Phone.Push
Imports System.Data.Services.Client

Public Interface ICloudClientFactory
#If ACS Then
    ReadOnly Property TokenStore() As SL.Phone.Federation.Utilities.RequestSecurityTokenResponseStore

    Function ResolveRegistrationClient() As IRegistrationClient
#Else
    ReadOnly Property UserName() As String

    ReadOnly Property AuthenticationToken() As String

    Sub VerifyLoggedIn(ByVal userAlreadyLoggedInCallback As Action, ByVal userNotLoggedInCallback As Action)

    Sub SetUserName(ByVal userName As String, Optional ByVal persist As Boolean = False)

    Sub SetAuthenticationToken(ByVal authToken As String, Optional ByVal persist As Boolean = False)

    Function ResolveAuthenticationClient() As IAuthenticationClient
#End If
    Function ResolveTablesServiceContext(Optional ByVal key As String = "") As ITableServiceContext

    Function ResolveDataServiceCollection(Of T)(Optional ByVal key As String = "") As DataServiceCollection(Of T)

    Function ResolveCloudTableClient(Optional ByVal key As String = "") As ICloudTableClient

    Function ResolveCloudBlobClient(Optional ByVal key As String = "") As ICloudBlobClient

    Function ResolveCloudQueueClient(Optional ByVal key As String = "") As ICloudQueueClient

    Function ResolvePushNotificationClient() As ISamplePushUserRegistrationClient

    Sub CleanTablesClientsKey(ByVal key As String)

    Sub CleanAuthenticationToken()

    Function ResolveOdataServiceContext() As DataServiceContext
End Interface
